package inits

import (
	"day11/video-mngr/video-server/basic/config"
	"fmt"
	"github.com/spf13/viper"
)

func Viper() {

	viper.SetConfigFile("D:\\2304a-stu\\day11\\config.yaml")
	err := viper.ReadInConfig()
	if err != nil {
		panic("配置文件读取失败")
		return
	}
	err = viper.Unmarshal(&config.Config)
	if err != nil {
		panic("配置文件连接失败")
		return
	} else {
		fmt.Println("配置文件连接失败")
	}
}
